use "build/output/main_panel.dta", clear 

tsset coin_id date
sort coin_id date

keep if coin == "USDT"


eststo clear
eststo: reg r_btc HouseholdRating, vce(cluster wdate)
estadd local dow_fe "No"

eststo: reg r_btc HouseholdRating i.dow, vce(cluster wdate)
estadd local dow_fe "Yes"

eststo: reg r_eth HouseholdRating, vce(cluster wdate)
estadd local dow_fe "No"

eststo: reg r_eth HouseholdRating i.dow, vce(cluster wdate)
estadd local dow_fe "Yes"

eststo: reg r_doge HouseholdRating, vce(cluster wdate)
estadd local dow_fe "No"

eststo: reg r_doge HouseholdRating i.dow, vce(cluster wdate)
estadd local dow_fe "Yes"

esttab, drop(*.dow) star(* 0.10 ** 0.05 *** 0.01) r2

esttab using "analysis/output_tables/regression_returns_around_mlb.tex", replace booktabs label drop(*.dow) ///
	mgroups("BTC" "ETH" "DOGE", pattern(1 0 1 0 1 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span})) ///
	prehead(\begin{tabular}{l S S S S S S} \toprule) ///
	posthead(\midrule) postfoot(\bottomrule\end{tabular}) ///
	style(tex) substitute(\_ _) star  b(2) t(2) r2(2) ///
	nomtitles /// 
	varlabels(_cons "Constant" HouseholdRating "Rating") /// 
	star(* 0.10 ** 0.05 *** 0.01) ///
	stats(N r2 dow_fe, fmt(%9.0fc 2) layout("\multicolumn{1}{c}{@}" "\multicolumn{1}{c}{@}" "\multicolumn{1}{c}{@}") labels(`"\$N\$"' `"\(R^{2}\)"' `"Day-of-Week FE"'))
